import java.util.Scanner;

public class Average03 {
    public static void main(String[] args) {
        double[] arr = new double[3];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = avg(i+1);
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println("第" + (i+1) + "个学生的平均成绩是：" + arr[i]);
        }
    }
    public static double avg(int count){
        int java = 0;
        int sql = 0;
        int oracle = 0;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第" + count + "个学生Java成绩：");
        java = sc.nextInt();
        System.out.println("请输入第" + count + "个学生SQL成绩：");
        sql = sc.nextInt();
        System.out.println("请输入第" + count + "个学生Oracle成绩：");
        oracle = sc.nextInt();
        double result = (java + sql + oracle ) * 1.0 / 3;
        return result;

    }
}
